# $Id$
# Maintainer: Guillaume ALAUX <guillaume@archlinux.org> 
# Contributor: Eric Belanger <eric@archlinux.org>
# Contributor: Sarah Hay <sarahhay@mb.sympatico.ca>

pkgname=cowsay
pkgver=3.04
pkgrel=1
pkgdesc='Configurable talking cow (and a few other creatures)'
arch=('any')
url='http://www.nog.net/~tony/warez/'
license=('PerlArtistic' 'GPL')
depends=('perl')
source=(https://github.com/tnalpgge/rank-amateur-cowsay/archive/cowsay-$pkgver.tar.gz
        cowsay.patch)
sha512sums=('99d21ef9a7c7c76056cb7acb2c771fbdabfedde4f6edb5d3035337c59f9e88944690d1b43282c32827ad79339199716366c8be73b0dea09063ec2d52220c1b51'
            '4c70074fc88e741f2eb4daa04a55ef3ff0638bffda907fe451299aeb2271a3b09c4b73df4d3eb83f6ac91b9cb05530bb2a59df81c72602728441254624a05327')

build() {
	cd rank-amateur-cowsay-${pkgname}-${pkgver}
	patch -p1 -i $srcdir/cowsay.patch
	sed -i 's|/man/|/share/man/|' install.sh
}

package() {
	cd rank-amateur-cowsay-${pkgname}-${pkgver}
	echo "${pkgdir}/usr" | ./install.sh
	# This one is not a valid '.cow' file
	rm ${pkgdir}/usr/share/cows/mech-and-cow
}
